import os

from langchain_openai import ChatOpenAI
OPENAI_API_KEY = os.environ["OPENAI_API_KEY_ZHIHU"]
OPENAI_API_BASE_ZHIHU = os.environ["OPENAI_API_BASE_ZHIHU"]
# OPENAI_API_BASE_ZHIHU = "https://ai.devtool.tech/proxy/v1"
# OPENAI_API_KEY = "sk-proj-Q5Q7A01Fj5BqFkc8aORDT3BlbkFJAxrZf4jkArCE68csEMcu"
llm = ChatOpenAI(temperature=0.5, openai_api_key=OPENAI_API_KEY,openai_api_base=OPENAI_API_BASE_ZHIHU,model="gpt-4o")
response = llm.invoke("""帮我写一个Python程序，实现以下功能：输入一个整数，判断该整数是否为偶数，如果是偶数，则输出"是偶数"，否则输出"不是偶数"。""")
print(response.content)